home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 6
/
The Arsenal Files 6 (Arsenal Computer).ISO
/
prg_basi
/
n_b-v200.zip
/
NBT1
/
DMO
/
COLORTBX.DMO
< prev
next >
Wrap
Text File
|
1996-03-11
|
3KB
|
47 lines
$if 0
┌──────────────────────────╖ PowerBASIC v3.20
┌──┤ DASoft ╟──────────────────────┬──────────────────╖
│ ├──────────────────────────╢ Copyright 1995 │ DATE: 1995-10-01 ╟─╖
│ │ FILE NAME COLORTBX.DMO ║ by ╘════════════════─ ║ ║
│ │ ║ Don Schullian, Jr. ║ ║
│ ╘══════════════════════════╝ ║ ║
│ A license is hereby granted to the holder to use this source code in ║ ║
│ any program, commercial or otherwise, without receiving the express ║ ║
│ permission of the copyright holder and without paying any royalties, ║ ║
│ as long as this code is not distributed in any compilable format. ║ ║
│ IE: source code files, PowerBASIC Unit files, and printed listings ║ ║
╘═╤═════════════════════════════════════════════════════════════════════╝ ║
│ .................................... ║
╘═══════════════════════════════════════════════════════════════════════╝
$endif
$INCLUDE "DAS-NB01.INC"
$INCLUDE "DAS-NBT1.INC"
COLOR 7, 0
CLS
? "┌────────────────────────────────────────────────────────────────────────
? "│ TBoxCOLOR ( Row?, Col?, Rows?, Cols?, Attr? ) both fore and back
? "│ TBoxCOLORB ( Row?, Col?, Rows?, Cols?, Back? ) background only
? "│ TBoxCOLORF ( Row?, Col?, Rows?, Cols?, Fore? ) foreground only
? "├─────────────────────────────────────────────────────────────────────────────
? "│ Change the attribute, foreground color, or background color for a
? "│ rectangular area of the screen.
? "└─────────────────────────────────────────────────────────────────────────────
A% = 1000 '│ for quick padding with 0's
FOR Back? = 0 TO 15 '│ background colors
Row? = Back? + 9 '│ screen row
TBoxCOLORB Row?, 1, 1, 80, Back? '│ paint bkground for row
Col? = 2 '│ starting column
FOR Fore? = 0 to 15 '│ foreground colors
D$ = RIGHT$( USING$( "####", A% ), 3 ) '│ make a string
Tprint Row?, Col?, D$, 0 '│ print string using scrn attr
TBoxCOLORF Row?, Col?, 1, 3, Fore? '│ paint the foregrounds
INCR A%, 1 '│ next BINARY ATTR
INCR Col?, 5 '│ incr the columns
NEXT '│ next foreground
NEXT '│ next background
Tprint 25, 69, "PRESS A KEY", 14 '│ print msg
fAnyKey '│ await a key-press
TBoxCOLOR 9, 1, 16, 80, 7 '│ paint whole grid F&B
Tprint 25, 69, " THANK YOU ", 10 '│ BE POLITE!